package com.aspose.cells;

import java.util.ArrayList;

class zauv {
   static Object a(int var0, int var1, ArrayList var2, boolean var3) {
      if (var1 == 0 && !var3) {
         return null;
      } else {
         switch(var0) {
         case 0:
            return a(var2);
         case 1:
            return var1;
         case 2:
            return a(var2, var3);
         case 3:
            return b(var2);
         case 4:
            return c(var2);
         case 5:
            return d(var2);
         case 6:
         case 11:
            return var2.size();
         case 7:
            return f(var2);
         case 8:
            return e(var2);
         case 9:
            return h(var2);
         case 10:
            return g(var2);
         default:
            return null;
         }
      }
   }

   static zagu b(int var0, int var1, ArrayList var2, boolean var3) {
      if (var1 == 0 && !var3) {
         return zzk.a;
      } else {
         switch(var0) {
         case 0:
            return new zyy(a(var2));
         case 1:
            return zaaq.a(var1);
         case 2:
            return b(var2, var3);
         case 3:
            return new zyy(b(var2));
         case 4:
            return new zyy(c(var2));
         case 5:
            return new zyy(d(var2));
         case 6:
            return zaaq.a(var2.size());
         case 7:
            return j(var2);
         case 8:
            return i(var2);
         case 9:
            return l(var2);
         case 10:
            return k(var2);
         default:
            return zzk.a;
         }
      }
   }

   private static double a(ArrayList var0) {
      double var1 = 0.0D;

      for(int var3 = 0; var3 < var0.size(); ++var3) {
         var1 += (Double)var0.get(var3);
      }

      return var1;
   }

   private static double b(ArrayList var0) {
      if (var0.size() == 0) {
         return 0.0D;
      } else {
         double var1 = (Double)var0.get(0);

         for(int var3 = 1; var3 < var0.size(); ++var3) {
            if ((Double)var0.get(var3) > var1) {
               var1 = (Double)var0.get(var3);
            }
         }

         return var1;
      }
   }

   private static double c(ArrayList var0) {
      if (var0.size() == 0) {
         return 0.0D;
      } else {
         double var1 = (Double)var0.get(0);

         for(int var3 = 1; var3 < var0.size(); ++var3) {
            if ((Double)var0.get(var3) < var1) {
               var1 = (Double)var0.get(var3);
            }
         }

         return var1;
      }
   }

   private static Object a(ArrayList var0, boolean var1) {
      if (var0.size() == 0 && !var1) {
         return 0;
      } else if (var0.size() == 0 && var1) {
         return "#DIV/0!";
      } else {
         double var2 = 0.0D;

         for(int var4 = 0; var4 < var0.size(); ++var4) {
            var2 += (Double)var0.get(var4);
         }

         return var2 / (double)var0.size();
      }
   }

   private static double d(ArrayList var0) {
      if (var0.size() == 0) {
         return 0.0D;
      } else {
         double var1 = 1.0D;

         for(int var3 = 0; var3 < var0.size(); ++var3) {
            var1 *= (Double)var0.get(var3);
         }

         return var1;
      }
   }

   private static Object e(ArrayList var0) {
      if (var0.size() < 1) {
         return "#DIV/0!";
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         int var5 = var0.size();

         for(int var6 = 0; var6 < var0.size(); ++var6) {
            double var7 = (Double)var0.get(var6);
            var1 += var7;
            var3 += var7 * var7;
         }

         return Math.sqrt(((double)var5 * var3 - var1 * var1) / (double)(var5 * var5));
      }
   }

   private static Object f(ArrayList var0) {
      if (var0.size() < 2) {
         return "#DIV/0!";
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         double var5 = (double)var0.size();

         for(int var7 = 0; var7 < var0.size(); ++var7) {
            double var8 = (Double)var0.get(var7);
            var1 += var8;
            var3 += var8 * var8;
         }

         return Math.sqrt((var5 * var3 - var1 * var1) / (var5 * (var5 - 1.0D)));
      }
   }

   private static Object g(ArrayList var0) {
      if (var0.size() < 1) {
         return "#DIV/0!";
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         int var5 = var0.size();

         for(int var6 = 0; var6 < var0.size(); ++var6) {
            double var7 = (Double)var0.get(var6);
            var1 += var7;
            var3 += var7 * var7;
         }

         return ((double)var5 * var3 - var1 * var1) / (double)(var5 * var5);
      }
   }

   private static Object h(ArrayList var0) {
      if (var0.size() < 2) {
         return "#DIV/0!";
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         double var5 = (double)var0.size();

         for(int var7 = 0; var7 < var0.size(); ++var7) {
            double var8 = (Double)var0.get(var7);
            var1 += var8;
            var3 += var8 * var8;
         }

         return (var5 * var3 - var1 * var1) / (var5 * (var5 - 1.0D));
      }
   }

   private static zagu b(ArrayList var0, boolean var1) {
      if (var0.size() == 0 && !var1) {
         return zyy.a;
      } else if (var0.size() == 0 && var1) {
         return zza.a;
      } else {
         double var2 = 0.0D;

         for(int var4 = 0; var4 < var0.size(); ++var4) {
            var2 += (Double)var0.get(var4);
         }

         return new zyy(var2 / (double)var0.size());
      }
   }

   private static zagu i(ArrayList var0) {
      if (var0.size() < 1) {
         return zza.a;
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         int var5 = var0.size();

         for(int var6 = 0; var6 < var0.size(); ++var6) {
            double var7 = (Double)var0.get(var6);
            var1 += var7;
            var3 += var7 * var7;
         }

         return new zyy(Math.sqrt(((double)var5 * var3 - var1 * var1) / (double)(var5 * var5)));
      }
   }

   private static zagu j(ArrayList var0) {
      if (var0.size() < 2) {
         return zza.a;
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         double var5 = (double)var0.size();

         for(int var7 = 0; var7 < var0.size(); ++var7) {
            double var8 = (Double)var0.get(var7);
            var1 += var8;
            var3 += var8 * var8;
         }

         return new zyy(Math.sqrt((var5 * var3 - var1 * var1) / (var5 * (var5 - 1.0D))));
      }
   }

   private static zagu k(ArrayList var0) {
      if (var0.size() < 1) {
         return zza.a;
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         int var5 = var0.size();

         for(int var6 = 0; var6 < var0.size(); ++var6) {
            double var7 = (Double)var0.get(var6);
            var1 += var7;
            var3 += var7 * var7;
         }

         return new zyy(((double)var5 * var3 - var1 * var1) / (double)(var5 * var5));
      }
   }

   private static zagu l(ArrayList var0) {
      if (var0.size() < 2) {
         return zza.a;
      } else {
         double var1 = 0.0D;
         double var3 = 0.0D;
         double var5 = (double)var0.size();

         for(int var7 = 0; var7 < var0.size(); ++var7) {
            double var8 = (Double)var0.get(var7);
            var1 += var8;
            var3 += var8 * var8;
         }

         return new zyy((var5 * var3 - var1 * var1) / (var5 * (var5 - 1.0D)));
      }
   }
}
